﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default"  %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title>
Go Slow Calendar</title>
<head>
    <style type="text/css">
        #form1
        {
            width: 506px;
        }
        div.main
        {
            position:absolute;
            left:1%;
            top:1%;
            height:98%;
            width:98%;
            border-style:solid;
            border-color:red;
        }
        div.cal
        {
            top:1%;
            left:1%;
            height: 79.25%;
            width: 69.5%;
        }
        div.notes
        {
            top:0.5%;
            border-style:solid;
            border-color:black;
            height:79%;
            width:28%;
            position:absolute;
            left:71%;
        }
        div.visualization
        {
            border-style:solid;
            border-color:Black;
            height:18%;
            top:81%;
            width:98.5%;
            position:absolute;
            left:0.5%;
        }
        .ModalWindow
    {
     border: solid;
    border-width:3px;
    background:#f0f0f0; 
    left:0.5%;
    top:0%;
    height: 79.25%;
    width: 69.5%;
    position:absolute;
    overflow:auto;
    }
    .morningWindow
    {
     border: solid;
    border-width:3px; 
    width:100%;
    height:100%;
    }
    .eveningWindow
    {
     border: solid;
    border-width:3px;
    width:48%;
    top:1%;
    height:95%;
    left:50%;
    position:absolute;
    }
    #createEvent
    {
    position:absolute;
    left:60%;
    top:10%;	
    }
    .CommentTable
    {
    	position:relative;
    	top:30%;
    	width:80%;
    	height:80%;
    }
    .closeButton
    {
    	position:absolute;
    	left:92%;
    	top:1%;
    }
    .tableRow
    {
    	
    }
    .popDay
    {
    	background-color:Blue;

    }
    .popDay2
    {
    	background-color:Red;
    }
    .but
    {
    	position:absolute;
    }
    .backCSS
    {
    	 background-color:#333333;
        filter:alpha(opacity=10);
        opacity:0.5;
    }
    .createPop
    {
    	position:absolute;
    	width:50%;
    	height:50%;
    	background-color:White;
    }
    .dateLabel
    {
        position:absolute;
        top:1%;
        left:48%;
        font-size:large;
        text-align:center;
    }
    .dateTable
    {
        position:absolute;
        border: 1px solid #000000;
        top:7%;
    }
    .entryTable
    {
        position:absolute;
        top:7%;
        left:2%;
    }
    .eventSubmitButton
    {
        position:absolute;
        left:87%;
        top:90%;   
    }
    .calendar
    {
    	
    }
    </style>
</head>

<body bgcolor="White">
<form id="form1" runat="server">
<ajax:ToolkitScriptManager ID="ScriptManager1" runat="server"/>

 <asp:Button ID="dummyButton" runat="server" style="display:none" />
<ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="dummyButton" PopupControlID="panModal" CancelControlID="Button2" BackgroundCssClass="backCSS"/>
        
<ajax:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="btnView" PopupControlID="DayEntryPanel" CancelControlID="Button3" BackgroundCssClass="backCSS"/>
        
        
 <!-- the DayEntryPanel is the panel that allows the user to type in information and add events -->
        
<asp:Panel ID="DayEntryPanel" runat="server" style="display:none" CssClass="ModalWindow">
    <asp:Button ID="Button3" runat="server" Text="Close" CssClass="closeButton" />
    <asp:Table ID="eventEntryTable" runat="server" CssClass="entryTable" Width="95%" Height="90%" HorizontalAlign="Center">
    <asp:TableHeaderRow ID="tableHeader1" runat="server">
    <asp:TableHeaderCell ID="tableHeaderCell1" runat="server" Text="Enter event data below" />
    </asp:TableHeaderRow>
    <asp:TableRow runat="server" ID="eventNameTableRow" HorizontalAlign="Center">
    <asp:TableCell ID="eventNameTableCell" runat="server" VerticalAlign="Middle">
    <asp:Label ID="eventNameLabel" runat="server" Text="Event title    " />
    <asp:TextBox ID="eventNameTextBox" runat="server" />
    </asp:TableCell>
    </asp:TableRow>
    
    <asp:TableRow runat="server" ID="eventContentTableRow" HorizontalAlign="Center">
    <asp:TableCell ID="TableCell1" runat="server" VerticalAlign="Middle">
    <asp:Label ID="Label1" runat="server" Text="Event content    " />
    <asp:TextBox ID="eventContentTextBox" runat="server" />
    </asp:TableCell>
    </asp:TableRow>
    
    
    <asp:TableRow runat="server" ID="eventStartTimeTableRow" HorizontalAlign="Center">
    <asp:TableCell ID="eventStartTimeTableCell" runat="server" VerticalAlign="Middle">
    <asp:Label ID="eventStartTimeLabel" runat="server" Text="Event start time    " />
    <asp:TextBox ID="eventStartTimeTextBox" runat="server" />
    </asp:TableCell>
    </asp:TableRow>
    <asp:TableRow ID="eventEndTimeTableRow" runat="server" HorizontalAlign="Center">
    <asp:TableCell ID="eventEndTimeTableCell" runat="server" VerticalAlign="Middle">
    <asp:Label ID="eventEndTimeLabel" runat="server" Text="Event end time    " />
    <asp:TextBox ID="eventEndTimeTextBox" runat="server" />
    </asp:TableCell>
    </asp:TableRow>
    </asp:Table>
    
    <asp:Button ID="submitButton" runat="server" Text="Submit Entry" CssClass="eventSubmitButton" OnClick="SubmitData"/>
</asp:Panel> 
        
 <!-- Everything in this panel is in the day pop up.  This is the 3 column pop up with the day information-->
  <asp:Panel ID="panModal" runat="server" style="display:none" CssClass="ModalWindow">
     <asp:Button ID="Button2" runat="server" Text = "Close" CssClass="closeButton" />
     <asp:Label ID="dateTableLabel" runat="server" Text="" CssClass="dateLabel"/>
    <asp:Table ID="dayTable" runat="server" BorderStyle="Solid" CssClass="dateTable" Width="100%" Height="93%" Font-Size="Large" BorderWidth=".5px" BorderColor="Black" GridLines="Both">

    </asp:Table>
  </asp:Panel>
  
  
  <asp:Panel ID="dayPopUpPanel" runat="server" style="display:none">
    <asp:Button ID="buttonCan" runat="server" Text="close" CssClass="but"/>
  </asp:Panel>
  
  <!-- The Main div, holds every other div, it is the main window -->
<div class = "main">


<!-- The calendar div will hold the calendar on the base level -->
<div class = "cal">
 
<div id="createEvent">
   <asp:Button ID="btnView" runat="server" Text="Create Event" />
</div>

<asp:Calendar ID = "myCal" OnDayRender="RenderDay"
    OnSelectionChanged = "SelectionChanged" Width = "100%" Height="100%" runat = "server" BackColor="White" 
    BorderColor="White" BorderWidth="1px" CellPadding="1" EnableTheming="False" 
    Font-Names="Verdana" Font-Size="9pt" ForeColor="Black">
    <SelectedDayStyle BackColor="#333399" ForeColor="White" />
    <TodayDayStyle BackColor="#CCCCCC" />
    <OtherMonthDayStyle ForeColor="#999999" />
    <DayStyle BorderColor="#000066" BorderWidth="1px" />
    <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" 
        VerticalAlign="Bottom" />
    <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
    <TitleStyle BackColor="White" BorderColor="Black" BorderWidth="1px" 
        Font-Bold="True" Font-Size="12pt" ForeColor="#333399" />
        <DayStyle HorizontalAlign="Right" VerticalAlign="Top"/>
        <TitleStyle BackColor="Beige" />
        <NextPrevStyle VerticalAlign="Top" />
</asp:Calendar>

</div>


<!-- the notes div will hold the notes -->
<div class = "notes">
<center>
<asp:label runat="server" id = "NotesLabel" Text = "Notes" Font-Bold=true Font-Underline=true Font-Size="XX-Large"/>
</center>
</div>


<asp:UpdatePanel UpdateMode="Conditional" runat="server">
<ContentTemplate>

<!-- the vizdiv holds the java applet with the vizualization -->
<div id="vizdiv" class = "visualization">
<script type="text/javascript"
		src="http://www.java.com/js/deployJava.js"></script>
	<script type="text/javascript">
	  /* <![CDATA[ */

        var divh = document.getElementById('vizdiv').offsetHeight;
        var divw = document.getElementById('vizdiv').offsetWidth;

	  var attributes = { 
            code: 'ball2.class',
            archive: 'ball2.jar',
            width: divw, 
            height: divh
          };
          var parameters = { };
          var version = '1.5';
          deployJava.runApplet(attributes, parameters, version);

          /* ]]> */
        </script>



</div>
</ContentTemplate>
</asp:UpdatePanel>

<!-- reflection div holds the reflection options -->

<div id="reflection">

</div>

</div>
</form>
</body>
</html>
